<template>
  <view v-if="state && state.equipId">
    <BeeperContactModel v-if="state.equipType === 1" :equipId="state.equipId" :equipType="state.equipType" />
    <MindContactModel v-if="state.equipType === 2" :equipId="state.equipId" :equipType="state.equipType" />
  </view>
</template>

<script setup lang="ts">
import BeeperContactModel from '@/subcontract/equipment/addressBook/component/beeperContactModel/index.vue';
import MindContactModel from '@/subcontract/equipment/addressBook/component/mindContactModel/index.vue';
interface IState {
  equipType: number;
  equipId: number;
}

const state = reactive<IState>({ equipType: 0, equipId: 0 });

onLoad((options) => {
  if (!options) return;
  state.equipType = Number(options.equipType);
  state.equipId = Number(options.equipId);
});
</script>
